<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>音频 视频测试</h1>
    <!-- <video width="100%" controls src="../mp4/sintel.mp4"></video> -->
    <audio src="../mp4/nan3nan.mp3"></audio>

    <button onclick="myplay()">PLAY </button>
    <button onclick="mystop()">STOP </button>
    <button onclick="mychange()">换歌 </button>
    <button onclick="gogo()">快进 </button>
</body>
<script>
var mp3 =  document.querySelector('audio')

function gogo(){
    console.log(mp3.currentTime ,  mp3.duration);
    mp3.currentTime +=10;   // 快进10秒
} 

function myplay(){
    mp3.play();
}

function mystop(){
    mp3.pause();
}

function mychange(){
    mp3.src = "../mp4/dream.mp3";
}

</script>
</html>